const express = require('express')
const path = require('path')


// module.exports = (dir) => {
  // dir = dir || '.'
  const app = express()
  const router = express.Router()
// console.log(path.join(__dirname,'..', 'assets'), '---')
  app.use(express.static(path.join(__dirname,'..', 'assets')));
  
  app.use(router)

  router.get('/posts/*', (req, res, next) => {
    console.log(req.params, 'params')
    res.send(req.params[0])
  })
  router.get('/', (req, res, next) => {
    res.send('文章列表') 
  })


  app.listen(5656, () => {console.log(3535)})
// }